#ifndef NALPARSER_H
#define NALPARSER_H

#include <vector>
#include <iostream>


/*帧信息解析相关api*/

int h264_frame_type(unsigned char*buf,unsigned int nLen);//获取h264帧类型

int h265_frame_type(unsigned char*buf,unsigned int nLen);//获取h265帧类型

void GetResolution(const char *code_name, unsigned char*buf, unsigned int nLen, unsigned int* width, unsigned int* height );

/*********************************************** 
*Description : 获取sei帧的payload
*Input		 : code_name: 编码类型名(H264/H265)  buf: 帧数据缓冲区(不需要开始字符串) nLen: 帧数据长度,
*Output		 : payload: payload
*Return      : 成功返回true
*Author      : jixiang.zhang
*data        : 
***********************************************/
bool GetSEIPayload (const char *code_name, unsigned char*buf, unsigned int nLen, std::vector<int8_t>& payload);

void GetFrameRate(const char *code_name, unsigned char*buf, unsigned int nLen, float* framerate);


#endif

